package com.xgxf.server.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xgxf.server.common.BaseServiceImpl;
import com.xgxf.server.common.JsonResult;
import com.xgxf.server.mapper.FilesManageMapper;
import com.xgxf.server.pojo.FilesManage;
import com.xgxf.server.pojo.FilesManageQuery;
import com.xgxf.server.service.IFilesmanageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class FileManageServiceImpl extends BaseServiceImpl<FilesManageMapper, FilesManage> implements IFilesmanageService {

    @Autowired
    private FilesManageMapper paMapper;

    @Override
    public JsonResult getList(FilesManageQuery parameterQuery) {
        IPage<FilesManage> iPage = new Page<>(parameterQuery.getPage(),parameterQuery.getLimit());
        IPage<FilesManage> pageData = paMapper.getList(iPage,parameterQuery);
        return JsonResult.success(pageData,"列表获取成功！");
    }

    @Override
    public JsonResult getVinList() {
        List<String> data = paMapper.getVinList();
        return JsonResult.success(data,"列表获取成功！");
    }

}